<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    p{
      width: 400px;
      height: 400px;
      background-color: pink;
    }
  </style>
</head>
<body>
  <div draggable="true">上午好</div>
  <p ondragover=""></p>
  <br>
  <img src="http://47.99.54.209/images/four2.gif" alt="" width="1000px">
</body>
<script>
  var img=document.querySelector('img')
  var div=document.querySelector('div')

  var date=new Date();
  var hour=date.getHours();

  if(hour<12){
    img.src='/tu/1.jpg'
    div.innerHTML='上午好'
  }else if(hour<18){
    img.src='/tu/2.png'
    div.innerHTML='中午好'
  }
  div.onclick=function(){
    alert()
  }

</script>
</html>